package cn.lcc.utils;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication()
@EnableAsync
@EnableScheduling
public class Application implements CommandLineRunner {

    public static void main(String[] args) {
//        ConfigurableApplicationContext run = SpringApplication.run(Application.class, args);
        new SpringApplicationBuilder(Application.class)
                .web(WebApplicationType.NONE) // .REACTIVE, .SERVLET
                .run(args);
    }

    @Override
    public void run(String... args) throws Exception {
        System.out.println("程序启动 ");
    }
}
